<?php
	//User interface for viewing completed inspections in list format.
	include 'common.php';
	print_header();
	session_start();
	$user = $_SESSION['user'];
?>	
		<div id="userDiv">
			<p id="userName">UserName: <?= $user ?> </p>
			<form action="index.php">
				<button type="submit" class="unButtons">Log Out</button>
			</form>
			<form action="controlpanel.php">
				<button type="submit" class="unButtons">Back</button>
			</form>
		</div>
		
		<div id="sort">
			<p>Facility:</p>
			<select value="file">
				<?php $completedList = file("../files/facilityList.txt");
					foreach($completedList as $file){?>
						<option value="<?=$file?>"><?=$file?></option>
					<?php }?>
			</select>
		</div>
		
		<br />
		
		<div>
			<p id="completedList">Completed Checklists</p>
			<div id="selections">
				<p>Select |</p>
				<p>File Name</p>
				<form>
				<?php $completedList = file("../files/completedList.txt");
					foreach($completedList as $file){?>
						<input type="checkbox" name="<?=$file?>"> | <?=$file?> <br />
				<?php }?>
				</form>
			</div>
			<br />
			<center>
				<button type="share" class="completedButtons">Share Selected</button>
				<button type="delete" class="completedButtons">Delete Selected</button>
				<button type="PDF" class="completedButtons">Save Selected as PDF</button>
			</center>
		</div>
<?php
	print_footer();
?>